package com.myopen.route;

import com.jfinal.config.Routes;
import com.myopen.controller.admin.AdminController;
import com.myopen.controller.admin.AttrController;
import com.myopen.controller.admin.DicController;
import com.myopen.controller.admin.LogController;
import com.myopen.controller.admin.MemberController;
import com.myopen.controller.admin.OrderController;
import com.myopen.controller.admin.ProductCategoryController;
import com.myopen.controller.admin.ProductController;
import com.myopen.controller.admin.ResourceController;
import com.myopen.controller.admin.RoleController;
import com.myopen.controller.admin.TaskController;
import com.myopen.controller.admin.UserController;
import com.myopen.controller.admin.WebsiteColumnController;
import com.myopen.controller.admin.WebsiteContactController;
import com.myopen.controller.admin.WebsiteContentController;
import com.myopen.controller.admin.ConfigController;
import com.myopen.interceptor.AdminInterceptor;

public class AdminRoutes extends Routes{

	@Override
	public void config() {
		
		addInterceptor(new AdminInterceptor());
		
		add("/admin", AdminController.class);
		add("/admin/resource", ResourceController.class);
		add("/admin/user", UserController.class);
		add("/admin/role", RoleController.class);
		add("/admin/log", LogController.class);
		add("/admin/dic", DicController.class);
		add("/admin/task", TaskController.class);
		add("/admin/config", ConfigController.class);
		
		add("/admin/websiteColumn", WebsiteColumnController.class);
		add("/admin/websiteContent", WebsiteContentController.class);
		add("/admin/websiteContact", WebsiteContactController.class);

		add("/admin/product",ProductController.class);
		add("/admin/product/category",ProductCategoryController.class);
		add("/admin/order",OrderController.class);
		add("/admin/member",MemberController.class);
		add("/admin/attr",AttrController.class);
		
	}

}
